<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{padding: 0;margin: 0;}
        header{
            background-color: #333333;
            font-size: 14px;
            color: #c8c7c7;
        }
        header>div{
            width: 930px;
            margin: 0 auto;
            overflow: hidden;
        }
        header a{
            color: #c8c7c7;
            text-decoration: none;
        }
        header a:hover{
            color: #FF6700;
        }
        .header-left{
            float: left;
            padding-top: 15px;
        }
        .header-right{
            float: right;
        }
        .header-right .cart{
            margin-left: 30px;
            display: inline-block;
            padding: 15px 30px;
            background-color: #686767;
        }
        .header-right img{
            vertical-align: middle;
            height: 20px;
        }
        /* 导航 */
        nav{
            padding: 20px 0;
            width: 930px;
            margin: 0 auto;
            /* background-color: pink; */
            overflow: hidden;
        }
        nav>a{
            float: left;
            margin-right: 120px;
        }
        nav img{
            height: 50px;
        }
        nav div{
            float: left;
            line-height: 50px;
        }
        nav div a{
            margin-right: 10px;
            text-decoration: none;
            font-size: 14px;
            color: #000000;
        }
    </style>
</head>
<body>
    <header>
        <div>
            <div class="header-left">
                <a href="#">小米商城</a> |
                <a href="#">首页</a> |
                <a href="#">miui</a> |
                <a href="#">红米</a>
            </div>
            <div class="header-right">
                <a href="#">登录</a> |
                <a href="#">注册</a> |
                <a href="#">消息通知</a>
                <a href="#" class="cart">
                    <img src="./imgs/cart-icon.jpg" alt="">
                    购物车(2)
                </a>
            </div>
        </div>
    </header>
    <nav>
        <a href="#">
            <img src="./imgs/mi-logo.jpg" alt="">
        </a>
        <div>
            <a href="#">小米手机</a>
            <a href="#">电视</a>
            <a href="#">红米</a>
            <a href="#">小米手机</a>
            <a href="#">小米手机</a>
        </div>
        
    </nav>
</body>
</html>